home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / a_utils / lgrammar / src / grammar.h < prev    next >
Text File  |  1993-09-09  |  2KB  |  74 lines

  1. /*
  2.  *  Filename: grammar.h
  3.  *
  4.  */
  5.  
  6.  
  7. typedef struct node {
  8.            char         symb;
  9.            double       zusatz;
  10.            char         indice;
  11.            struct node *next;
  12.                     } SYMBOLE;
  13.  
  14. typedef struct rule {
  15.            char         symb;   /* left side of production */ 
  16.            double       zusatz; /* zusatz for angle resp. length */
  17.            char         indice; /* indice for turtle-symbol */
  18.            SYMBOLE     *list;   /* pointer to right side of production */
  19.            struct rule *next;   /* pointer to next rule */
  20.                     } REGELN;
  21.  
  22. typedef struct {
  23.            double x, y, z;
  24.                } POINT;
  25.  
  26.  
  27. typedef struct {
  28.            POINT  pos;        /* Positions-Vektor der Turtle */
  29.            POINT  h;          /* heading-Vektor */
  30.            POINT  l;          /* left-Vektor */
  31.            POINT  u;          /* up-Vektor */
  32.            double angle;      /* Winkel fuer Drehung der Turtle */
  33.            int    length;     /* Laenge in Pixel fuer F bzw. f */
  34.            double scale;      /* Verkleinerungsfaktor fuer F bzw. f */
  35.                } TURTLE_VALUES;
  36.  
  37.  
  38. typedef struct stack {
  39.            POINT position;
  40.            struct stack *next;
  41.                      } STACK;
  42.  
  43. typedef struct stack2 {
  44.            POINT  position;
  45.            POINT  head;
  46.            double sum_angle;
  47.            int    color;
  48.            struct stack2 *next;
  49.                       } STACK2;
  50.  
  51. typedef struct stack3 {
  52.            POINT  position;
  53.            POINT  head;
  54.            POINT  left;
  55.            POINT  up;
  56.            int    color;
  57.            struct stack3 *next;
  58.                       } STACK3;
  59.  
  60. typedef struct stackturtle {
  61.            POINT  position;
  62.            POINT  head;
  63.            POINT  left;
  64.            POINT  up;
  65.            int    color;
  66.            double stem;
  67.            struct stackturtle *next;
  68.                       } STACKTURTLE;
  69.  
  70.  
  71.  
  72. #define PI    3.141592653589793
  73. #define NOC  32                   /* number of colors */
  74.